package org.dromara.mall.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
import org.dromara.mall.domain.MallGoodsSpecVal;

import java.util.Collection;
import java.util.List;


/**
 * 商品规格Mapper接口
 *
 * @author Mr Lei
 * @date 2024-05-22
 */
@Mapper
public interface MallGoodsSpecValMapper extends BaseMapperPlus<MallGoodsSpecVal,MallGoodsSpecVal> {
    /*根据sku表的specValueId查询spec_value表*/
    List<MallGoodsSpecVal> findBySpecValueId(String specValueId);

    /*根据specId查询列表*/
    MallGoodsSpecVal selectBySpecId(Long specId);
    //根据规格IDS查询子表
    List<MallGoodsSpecVal> selectBySpecIds(List<Long> ids);

    /*根据Sku反查被关联的specValue表*/
    List<Long> findSpecIdBySku(Long specValueId);


}
